Release 10.1A: OpenEdge Development:
Web Services


Running a Progress non-persistent procedure

Methods that run a non-persistent procedure:

This is the Progress 4GL prototype for the sample FindCustomerByNum( ) method:

Progress 4GL prototype for a non-persistent external procedure
/* FindCustomerByNum.p */ 
DEFINE INPUT PARAMETER CustomerNumber AS INTEGER.  
DEFINE OUTPUT PARAMETER CustomerName AS STRING.  

This is a sample VB.NET declaration for the Progress non-persistent procedure method, FindCustomerByNum( ):

VB.NET prototype for a method that runs a Progress non-persistent procedure
Public Sub FindCustomerByNum( 
              ByVal CustomerNumber As Integer,  
              ByRef CustomerName As String) 

Note: Methods that run a Progress 4GL procedure always return a String for Document/Literal, and return a String for RPC/Encoded and RPC/Literal only if specified in ProxyGen.

This is a sample call to this method:

VB.NET client code calling an external procedure method
Dim CustomerName As String 
webService.FindCustomerByNum(3, CustomerName) 

This is a sample RPC/Encoded SOAP request that might be generated from this FindCustomerByNum( ) method invocation:

SOAP request from calling the FindCustomerByNum procedure method
<?xml version="1.0" encoding="utf-8" ?> 
<soap:Envelope namespaces defined here...> 
   <soap:Header> 
      <q1:OrderInfoID id="h_id1" 
         xmlns:q1="urn:OrderSvc:OrderInfo"> 
         <UUID xsi:type="xsd:string">2e62cab6b81150d5:167f64e:f295e997b0: 
         -8000;<OrderInfo|PX-000001|AO>;M/IryPm3piDcF/W5DsH4GA==</UUID> 
      </q1:OrderInfoID> 
   <soap:Header> 
   <soap:Body 
      soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
      <q1:FindCustomerByNum xmlns:q1="urn:OrderSvc:OrderInfo"> 
         <CustomerNumber xsi:type="xsd:int">3</CustomerNumber> 
      </q1:FindCustomerByNum> 
   </soap:Body> 
</soap:Envelope> 

Note the following:

This is a sample RPC/Encoded SOAP response that is generated by the WSA from this invocation of the FindCustomerByNum( ) method:

SOAP response from calling the FindCustomerByNum method
<?xml version="1.0" encoding="UTF-8" ?> 
<soap:Envelope namespaces defined here...> 
   <soap:Body> 
      <ns1:FindCustomerByNumResponse xmlns:ns1="urn:OrderSvc:OrderInfo" 
         soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> 
         <CustomerName xsi:type="xsd:string">Hoops</CustomerName> 
      </ns1:FindCustomerByNumResponse> 
   </soap:Body> 
</soap:Envelope> 

Note: The CustomerName value, "Hoops", returned and highlighted in the example.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095